package fidel.permission.po;

import java.io.Serializable;
import java.util.List;

/**
 * 用户身份信息，存入session
 * <p>
 * 由于tomcat将session会序列化在本地硬盘上，所以使用Serializable接口
 * 
 * @author fidel
 * 
 */
public class ActiveUser implements Serializable {
    private static final long serialVersionUID = 8628717992343202867L;
    private String userid;// 用户id（主键）
    private String usercode;// 用户账号
    private String username;// 用户名称
    private List<SysPermission> menus;// 菜单
    private List<SysPermission> buttons;// 按钮

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUsercode() {
        return usercode;
    }

    public void setUsercode(String usercode) {
        this.usercode = usercode;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public List<SysPermission> getMenus() {
        return menus;
    }

    public void setMenus(List<SysPermission> menus) {
        this.menus = menus;
    }

    public List<SysPermission> getButtons() {
        return buttons;
    }

    public void setButtons(List<SysPermission> buttons) {
        this.buttons = buttons;
    }

    @Override
    public String toString() {
        return "ActiveUser [userid=" + userid + ", usercode=" + usercode + ", username=" + username + ", menus=" + menus
            + ", buttons=" + buttons + "]";
    }
}
